package graph_viewer.factory;

import java.io.IOException;

import graph_viewer.canvas.*;
import graph_viewer.app_exception.*;
import graph_viewer.util.*;

public class  Canvas_Factory{	

	public Drawer_Canvas create( String canvas_type, String file_name )  throws IOException{
		if ( canvas_type.equals( Factory_Values.GRAPH_CANVAS ) ){
			Debug.println( "GRAPH_CANVAS canvas created", 2 );
			return new Graph_Canvas( file_name );
		}else{
			throw new App_Exception( "Invalid canvas argument!" );		
		}

	}	
}